//
//  KDMessagePushListCell.m
//  YuQingXiaoFang
//
//  Created by wangdongdong on 18/5/17.
//  Copyright © 2018年 KDTech. All rights reserved.
//

#import "KDMessagePushListCell.h"
#import "NSString+KD.h"
@interface KDMessagePushListCell ()

/**
 *  cell底部的view
 */
@property (weak, nonatomic) IBOutlet UIView *underView;
@property (weak, nonatomic) IBOutlet UILabel *titleLb;
@property (weak, nonatomic) IBOutlet UILabel *comeFromLb;
@property (weak, nonatomic) IBOutlet UILabel *timeLb;
@property (nonatomic,retain) NSDateFormatter *fmt;

@end

@implementation KDMessagePushListCell
- (NSDateFormatter *)fmt
{
    if (!_fmt) {
        _fmt = [[NSDateFormatter alloc]init];
        _fmt.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"zh_CN"];;
        _fmt.dateFormat = @"YYYY-MM-dd HH:mm:ss";
    }
    return _fmt;
}
+(instancetype)cellWithTableView:(UITableView *)tableView{
    static NSString *cellId=
    @"KDMessagePushListCell";
    KDMessagePushListCell *cell=[tableView dequeueReusableCellWithIdentifier:cellId];
    cell.backgroundColor=BackGroundColor;
    cell.selectionStyle=UITableViewCellEditingStyleNone;
         return cell;
}
-(void) setModel:(KDMessagePushListCellModel *)model{
    _model=model;
    self.titleLb.attributedText=[NSString praseHtmlStr:model.crawTitle];
    self.comeFromLb.text=model.siteName;
    //NSDateFormatter *fmt=[[NSDateFormatter alloc]init];
    //fmt.locale=[[NSLocale alloc] initWithLocaleIdentifier:@"zh_CN"];
    //fmt.dateFormat=@"YYYY-MM-dd HH:mm:ss.S";
    //NSDate *date=[fmt dateFromString:model.crawPublishtime];
    //NSString *dateStr=[self.fmt stringFromDate:date];
    self.timeLb.text=model.crawPublishtime;
    
    
}



@end
